<?php
namespace Api\Controller;
use Common\Controller\BaseController;

class EmailController extends BaseController{

    /**
     * huhaiqin,2023.05.30
     * 注册时发送邮箱验证码
     * xqx 2023.06.11  修改传入参数
     * param email 邮箱地址
     * param type 邮件类型：reg:注册\findpwd:找回密码\thanks
     */
    public function send(){
        $m = D('Email');
        $m->_send($_REQUEST['email'],$_REQUEST['type']);
    }

    /**
     * huhaiqin，2023.05.30
     * 校验邮箱验证码
     * param uid 用户ID
     * param code 用户提交的验证码
     */
    public function check_code(){
        D('Email')->_check_code($_REQUEST['uid'],$_REQUEST['code']);
    }
}